@import (reference) "~ui/styles/theme";
@import (reference) "~ui/styles/variables";

kbn-management-app,
kbn-management-landing,
kbn-management-indices,
kbn-management-indices-edit,
kbn-management-indices-create,
kbn-management-advanced,
kbn-management-objects,
kbn-management-objects-view {
  display: block;
}

.tab-account {
  background-color: #FFFFFF;
}

.tab-management {
  background-color: #FFFFFF;
}

.kbn-management-tab:first-letter {
  text-transform: capitalize;
}

kbn-management-app {
  li.current-page {
    font-size: 1.5em;
    margin: 0 10px;
  }
}

kbn-management-landing {
  .management-panel {
    margin-bottom: 10px;

  }

  .management-panel__body {
    padding-bottom: 30px;
  }

  .management-panel__link {
    font-size: 17px;
    line-height: 32px;

    &.management-panel__link--disabled {
      opacity: 0.5;
      cursor: default;

      &:hover, &:visited {
        color: @kibanaBlue2;
      }
    }
  }

  .management-section-info {
    bottom: 10px;
    display: none;
    color: @kibanaPink1;
    font-size: 0.8em;
    position: absolute;
  }

  .management-section-info-expanded {
    .management-section-info {
      display: block;
    }
  }

  /**
   * 1. Set icon size.
   * 2. Hack the panel title to move to the left a bit.
   */
  .management-panel__heading-icon {
    width: 20px; /* 1 */
    height: 20px; /* 1 */
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain; /* 1 */
    margin-right: -3px; /* 2 */
  }

  .management-panel__heading-icon--elasticsearch {
    background-image: url("~ui/icons/elasticsearch-gray.svg");
  }

  .management-panel__heading-icon--kibana {
    background-image: url("~ui/icons/kibana-gray.svg");
  }

  .management-panel__heading-icon--beats {
    background-image: url("~ui/icons/beats-gray.svg");
  }

  .management-panel__heading-icon--logstash {
    background-image: url("~ui/icons/logstash-gray.svg");
  }

  .management-panel__heading-icon--secondary {
    font-size: 0.9em;
    padding: 5px;
  }
}

kbn-management-objects {
  form {
    margin-bottom: @line-height-computed;
  }
  .list-unstyled {
    li {
      border-bottom: 1px solid;
      border-bottom-color: @management-objects-list-border;
      padding: 8px;
    }
  }
  .empty {
    color: @management-objects-empty-color;
  }

  .item {
    padding: 12px;

    .item-title {
      margin-left: 30px;
    }

    .actions {
      margin-top: -6px;
    }
  }

  .action-bar {
    margin-top: 10px;
    background-color: @management-objects-action-bar-bg;
    padding: 4px 12px;

    label {
      font-size: 10px;
      font-weight: normal;
    }

    .btn {
      font-size: 10px;
      margin-left: 20px;
    }
  }

  .header {
    .title, .controls {
      padding-right: 1em;
      display: inline-block;
    }
  }
}

kbn-management-advanced {
  // super specific rule to override bootstrap's equally specific rule
  // https://github.com/twbs/bootstrap/blob/1f329f8f17aa989eabc6e94bdcab93e69ef0e463/less/tables.less#L35
  .table {
    table-layout: fixed;

    tbody > tr > td {
      vertical-align: middle;
    }
  }
}

kbn-management-objects-view {
  .ace_editor { height: 300px; }
}

.advanced-settings {
  overflow-x: scroll;

  table {
    width: 100%;

    tr.default td.value {
      color: @management-advanced-table-default-color;
    }

    td {
      font-family: @font-family-monospace;

      &.actions {
        width: 150px;
      }
    }
  }
}

.indices-settings {
  i.active {
    color: @management-indices-active-color;
  }

  tr.field-settings {
    .field-popularize {
      margin-left: 5px;
      display: none;
    }
    &:hover .field-popularize {
      display: inline;
    }
  }
}

kbn-management-indices {
  .fields {
    display: block;
    table {
      .table-striped()
    }

    th:last-child,
    td:last-child {
      text-align: right;
    }
  }

  .indexed-fields {
    th:first-child,
    td:first-child {
      width: 35%;
    }
  }

  .scripted-fields header {
    margin: 5px 0;
    text-align: right;
  }

  p.text-center {
    padding-top: 1em;
  }
}

.kbn-settings-indices-create {
  .time-and-pattern > div {}
}

@import "~ui/dragula/gu-dragula.less";
